//
//  HMPopMenu.h
//  黑马微博-wzy
//
//  Created by Mac on 2016/12/4.
//  Copyright © 2016年 Mac. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef enum {
    HMPopMenuArrowPositionCrnter = 0,
    HMPopMenuArrowPositionLeft = 1,
    HMPopMenuArrowPositionRight = 2
}HMPopMenuArrowPosition;

@class HMPopMenu;

@protocol HMPopMenuDelete <NSObject>

@optional
- (void)popMenuDidDismissed:(HMPopMenu *)popMenu;

@end


@interface HMPopMenu : UIView

@property (nonatomic, weak) id<HMPopMenuDelete> deletegate;

@property (nonatomic, assign, getter=isSDimBackground) BOOL dimBackground;

@property (nonatomic, assign) HMPopMenuArrowPosition arrowPosition;

//方法
- (instancetype)initWithContentView:(UIView *)contentView;
+ (instancetype)popMenuWithContentView:(UIView *)contentView;

//设置菜单背景图片
- (void)setBackground:(UIImage *)background;

//显示菜单
- (void)showInRect:(CGRect)rect;

//关闭菜单
- (void)dismiss;


@end
